<?php
$this->headTitle('Tin rao vặt','append');
?>
<div class="dashboard-menu dashboard-admin">
    <span class="back">&nbsp;</span>
    <h1>Tin rao vặt</h1>
        <a class="btn btn-danger" href="<?php echo $this->url(array('module'=>'admin', 'controller'=>'product', 'action'=>'add'));?>">
            Thêm mới
        </a>
</div>
<div class="row placeholders">
    <div class="col-md-12">
        <div class="widget-big">
            <div class="table table-responsive">
                <div class="search-result">
                    <table class="table table-bordetext-danger table-striped table-condensed table-hover" border="0" cellspacing="0" cellpadding="0">
                        <thead>
                            <tr class="warning">
                                <th style="width:5%;">ID</th>
                                <th style="width:10%;">Khu Vực</th>
                                <th style="width:15%;">Danh Mục</th>                            
                                <th style="width:20%;">Tiêu Đề</th>                                                                                                                                
                                <th style="width:10%;" class="text-right">Giá sản phẩm</th>
                                <th style="width:10%;" class="text-right">N.Tạo</th>
                                <th style="width:10%;" class="text-right">N.Bắt đầu</th>
                                <th style="width:10%;" class="text-right">N.Kết th</th>
                                <th style="width:5%;">Liên Hệ</th>                                
                                <th style="width:5%;"class="text-right">Di Động</th>                                
                                <th style="width:5%;">Duyệt Bởi</th>
                                <th style="width:5%;">Chức Năng</th>
                            </tr>
                        </thead>
                        <tbody>
                        <?php                                                
                            foreach ($this->productList as $pro){                                
                        ?>
                            <tr>
                                <td style="width:5%;" class="text-left"><?=$pro['id'];?></td>
                                <td style="width:10%;" class="text-left"><?=$pro['areaName'];?></td>
                                <td style="width:15%;" class="text-left"><?=$pro['catName'];?> &raquo; <?=$pro['itemName'];?></td>                                
                                <td style="width:20%;" class="text-left">
                                    <a <?php echo ($pro['type']=='vi')?'style="color:red" title="Tin rao VIP"':'title="Tin rao thường"'?> href="<?=$this->url(array('module'=>'admin', 'controller'=>'product', 'action'=>'detail', 'id'=>$pro['id']))?>"><?=$pro['title'];?></a>
                                </td>                                                                                                                                                                                               
                                <td style="width:10%;" class="text-right"><?=number_format($pro['price'],0,'.',',')?> VNĐ</td>
                                
                                <td style="width:10%;" class="text-left"><?=date('Y-m-d H:i',$pro['createDate']);?></td> 
                                <td style="width:10%;" class="text-left"><?=date('Y-m-d H:i',$pro['startDate']);?></td>
                                <td style="width:10%;" class="text-left"><?=date('Y-m-d H:i',$pro['endDate']);?></td>
                                
                                <td style="width:10%;" class="text-left"><?=$pro['contact'];?></td>
                                <td style="width:10%;" class="text-left"><?=$pro['mobile'];?></td>
                                <td style="width:10%;" class="text-left"><?=$pro['viewer'];?></td>
                                <td style="width:5%;" class="text-left">                                
                                    <a class="glyphicon glyphicon-pencil" href="<?=$this->url(array('module'=>'admin', 'controller'=>'product', 'action'=>'edit', 'id'=>$pro['id']))?>" title="Sửa thông tin tài khoản"></a>
                                    &nbsp;&nbsp;                                
                                    <a class="glyphicon glyphicon-remove" href="<?=$this->url(array('module'=>'admin', 'controller'=>'product', 'action'=>'delete', 'id'=>$pro['id']))?>" title="Xoá tài khoản"></a>
                                </td>
                            </tr>
                        <?php
                            } 
                        ?>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>